package org.shiki.hrm.mapper;

import org.apache.ibatis.annotations.Select;
import org.shiki.hrm.domain.Employee;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.shiki.hrm.vo.UserInfoVo;

/**
 * <p>
 *  Mapper 接口
 * </p>
 * @author shiki
 * @since 2022-03-09
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

	@Select("SELECT t1.tel, t1.email, t2.address, t2.company_name cName FROM t_employee t1\n" +
			"LEFT JOIN t_tenant t2 ON t1.id = t2.admin_id\n" +
			"WHERE t1.login_id = #{id}")
	UserInfoVo getTenantInfoById(Long id);
}
